<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <title>品牌信息</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta name="author" content="飞啊飘啊">
	<meta name="hashcode" content="-1213181327">
	
	<script>window.duteTag="lz";</script>
	<script type="text/javascript" src="/admin/js/dute-1.0.js"></script>
	<script type="text/javascript" src="/admin/js/jquery-1.7.1.min.js"></script>
	
	<script type="text/javascript" src="/admin/js/lazy3q.ui.js"></script>
	<script>
		document.write('<link rel="stylesheet" type="text/css" href="/admin//css/'+($.cookie('theme')||'elegant')+'/lazy3q.ui.css" /> ');
	</script>
	
	<script type="text/javascript" src="/admin/js/jquery-ui-1.10.2.custom.min.js"></script>
	
	<!-- 用户自定义js(懒加载) -->
	<script type="text/javascript" src="/admin/js/define.js"></script>
	<!-- 用户自定义css样式 -->
	<link rel="stylesheet" type="text/css" href="/admin/css/define.css"/>
	<!-- icon font -->
  	<link rel="stylesheet" href="/admin/css/iconfont.css">
	
	
	
	<script type="text/javascript">
		window.basePath="/";
		window.hashcode = "-1213181327";
	</script>
		
	<!-- 感谢kindeditor出品的在线HTML编辑控件 -->
	<script type="text/javascript" charset="utf-8" src="/admin/js/kindeditor/kindeditor.js"></script>
		
	<!-- 感谢My97DatePicker出品的时间控件 -->
	<script language="javascript" type="text/javascript" src="/admin/js/My97DatePicker/WdatePicker.js"></script>
	
	<!------------------------VIEW_HTML_HEAD------------------------>
	<!------------------------VIEW_HTML_HEAD------------------------>	
	
</head>
<script>
Page({
  data:{
    
  },
  onLoad: function(options) {
  	var THIS = this;
  	THIS.setData(options);
  	$.getAjax("merchant.get.do",options,function(protocol){
  		if(protocol.message){
  			$.toast(protocol.message);
  		}
  		document.title={
  			 "insert":"创建品牌信息"
  			,"inport":"导入品牌信息"
  			,"update":"修改品牌信息"
  			,"detail":"品牌信息详情"
  		}[options.edittype];
  		THIS.setData(protocol.data); 
  		/******************VIEW_HTML_SET_DATA******************/
  		/******************VIEW_HTML_SET_DATA******************/
  	});
  }
});
</script>
<script>
window["lzFlashUrl"]=top.lzFlashUrl||"/admin/flash/";
window["uploadUrl"]=top.uploadUrl||"/admin/upload.do";

$(function(){
		if($("#profile").size()>0){
			 //构造编辑页merchant.profile为html编辑控件
			 KE.init({
				id : "profile",
				width : "750px",height : "300px", 
				imageUploadJson : window["uploadUrl"]
			 });
			 KE.create("profile");
		 }
		 
	$("#merchantForm").form({
		"":function(){}
		,"merchant.id":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
			}
		}
		,"merchant.brandName":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "品牌名称不能为空";
			}
			if(el.value.length>32 && el.value.indexOf("[*]")==-1)
				return "品牌名称最大长度为32个字符";
		}
		,"merchant.banner":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "品牌主图不能为空";
			}
		}
		,"merchant.profile":function(el){
			if($("#profile").get(0))
			 	KE.sync("profile");		 
		}
		,"merchant.corporateName":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "公司名称不能为空";
			}
			if(el.value.length>64 && el.value.indexOf("[*]")==-1)
				return "公司名称最大长度为64个字符";
		}
		,"merchant.companyAddress":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "公司地址不能为空";
			}
			if(el.value.length>128 && el.value.indexOf("[*]")==-1)
				return "公司地址最大长度为128个字符";
		}
		,"merchant.contacts":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "联系人不能为空";
			}
			if(el.value.length>32 && el.value.indexOf("[*]")==-1)
				return "联系人最大长度为32个字符";
		}
		,"merchant.contactNumber":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "联系电话不能为空";
			}
			if(el.value.length>32 && el.value.indexOf("[*]")==-1)
				return "联系电话最大长度为32个字符";
		}
		,"merchant.remark":function(el){
			if(el.value.length>256 && el.value.indexOf("[*]")==-1)
				return "备注信息最大长度为256个字符";
		}
		,"merchant.mSort":function(el){
				if(el.value.length>10)
					return "数字太大了";
					 var pattern = /^-?(0|[1-9][0-9]*)?$/;
					 if(!pattern.test(el.value))
						return "请输入正确格式的数字";			
		}
		,"merchant.openState":function(el){
		}
		,"merchant.updateTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "修改时间不能为空";
			}
		}
		,"merchant.addTime":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "添加时间不能为空";
			}
		}
		,"merchant.status":function(el){
			if($(el).parents("dd:eq(0)").find("b:contains('*')").size()>0){
				if(jQuery.trim(el.value)=="")
					return "请选择状态";
			}
		}
	},function(){
		/******************************LAZY3Q_FORM_VALIDATE******************************/
		/******************************LAZY3Q_FORM_VALIDATE******************************/
	});		
});
</script>

<body style="display:none;">



<!------------------------VIEW_HTML_TOP------------------------>
<!------------------------VIEW_HTML_TOP------------------------>


<form enctype="{{inports!=null?'multipart/form-data':''}}" lz:if="{{edittype=='insert'||edittype=='update'||edittype=='detail'||edittype=='any'||edittype=='inport'}}" class="form editform edittype_{{edittype}}" ref="Merchant" id="merchantForm" name="merchantForm" target="jsoniframe" action="merchant.{{edittype=='any'?'update':edittype}}.do" method="post">
	<div class="head"></div>
	<div class="body">
		<div class="content">
			<div lz:if="{{edittype!='detail'}}" class="prompt" style="display:none;">
				温馨提示：请仔细填写品牌信息相关信息，<span class="extrude">"*" 为必填选项。</span>
			</div>
			<br/>
			<lz:block lz:if="{{message}}">
			<br/>
			<center>
				<font color="red"><h4>{{message}}</h4></font>
			</center>
			<br/>
			</lz:block>
			<input type="hidden" value="{{complete}}" name="complete" id="complete" />
			<input type="hidden" value="{{ids}}" name="ids" id="ids" />
			<textarea name="PARAMS" id="PARAMS" style="display:none">{{PARAMS}}</textarea>
			
			
			<lz:block lz:if="{{inports}}">
			  <div class="line"></div>
			  <dl style="width:98%;">
			  	<dt>Excel文件:</dt>
			  	<dd>
			  		<input type="hidden" value="{{inports}}" name="inports" id="inports" />
			  		<input type="hidden" value="{{inport$}}" name="inport$" id="inport$" />
			  		<input name="file" name="file" type="file"/>
			  		<b>*</b>
			  		<div>
						请上传excel文件，表格列依次为：[{{inport$}}]，excel表格第一行为列名称，将不作为上传数据行
					</div>
			  	</dd>
			  </dl>
			  <div class="line"></div>
			</lz:block>
	{{lz.set("id_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"id"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"id"))))}}
	{{lz.set("id_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$id}}
	<dl lz:if="{{id_editable||id_readonly}}" class="id hidden " major  ref="id">
		<dt>编　　号:</dt>
		<dd lz:if="{{id_editable}}" input="hidden">
			<lz:block lz:if="{{merchant$id}}">
				{{merchant$id}}
			</lz:block>
			<lz:block lz:if="{{!merchant$id}}">
			<input type="hidden" value="{{lz.htm(merchant.id)}}" name="merchant.id" id="id" />
	 	 </lz:block>
	 	 
	 	 <em></em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{id_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="id">{{merchant.id}}</textarea>
		 		<span>
		 	
			 {{lz.html(merchant.id$||merchant.id)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$id}}
	{{lz.set("brandName_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"brandName"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"brandName"))))}}
	{{lz.set("brandName_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$brandName}}
	<dl lz:if="{{brandName_editable||brandName_readonly}}" class="brandName  " major  ref="brandName">
		<dt>品牌名称:</dt>
		<dd lz:if="{{brandName_editable}}" input="text">
			<lz:block lz:if="{{merchant$brandName}}">
				{{merchant$brandName}}
			</lz:block>
			<lz:block lz:if="{{!merchant$brandName}}">
		 	<input type="text" class="input narrow"   name="merchant.brandName" id="brandName"  value="{{lz.htm(merchant.brandName)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入品牌信息的品牌名称</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{brandName_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="brandName">{{merchant.brandName}}</textarea>
		 		<span>
		 	
			 {{lz.html(merchant.brandName$||merchant.brandName)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$brandName}}
	{{lz.set("banner_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"banner"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"banner"))))}}
	{{lz.set("banner_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$banner}}
	<dl lz:if="{{banner_editable||banner_readonly}}" class="banner   wider" major  ref="banner">
		<dt>品牌主图:</dt>
		<dd lz:if="{{banner_editable}}" input="image">
			<lz:block lz:if="{{merchant$banner}}">
				{{merchant$banner}}
			</lz:block>
			<lz:block lz:if="{{!merchant$banner}}">
		    <input type="text" class="input" maxlength="128" size="32" name="merchant.banner" id="banner"  value="{{lz.htm(merchant.banner)}}"/>
			<button type="button" onclick="$.upload({type:'img',callback:function(url){if(url)$('#banner').val(url)}})" class="button">设置图片</button>
			<button type="button" onclick="$('#banner').val('')" class="button">删除图片</button>
			<button type="button" onclick="$.thumb({url:$('#banner').val()})" class="button">查看图片</button>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请上传品牌信息的品牌主图</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{banner_readonly}}">
		 	<div class="state-input wide">
		 		<textarea class=""  style="display:none;" id="banner">{{merchant.banner}}</textarea>
		 		<span>
		 	<img lz:if="{{merchant.banner}}" onclick="$.thumb({url:this.src})" style="margin:10px;padding:1px;border:1px solid;" onload="if(this.width>this.height){this.width=96}else{this.height=96}" src="{{lz.htm(merchant.banner)}}"/>
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$banner}}
	{{lz.set("profile_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"profile"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"profile"))))}}
	{{lz.set("profile_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$profile}}
	<dl lz:if="{{profile_editable||profile_readonly}}" class="ribs profile   wider" minor  ref="profile">
		<dt>品牌简介:</dt>
		<dd lz:if="{{profile_editable}}" input="html">
			<lz:block lz:if="{{merchant$profile}}">
				{{merchant$profile}}
			</lz:block>
			<lz:block lz:if="{{!merchant$profile}}">
		    <textarea class="input wide html"  id="profile" name="merchant.profile" style="height:300px;visibility:hidden;">{{merchant.profile}}</textarea>
	 	 </lz:block>
	 	 
	 	 <em>请输入品牌信息的品牌简介</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{profile_readonly}}">
		 	<div class="state-input wide">
		 		<span>
		 	
			 {{lz.html(merchant.profile$||merchant.profile)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$profile}}
	{{lz.set("corporateName_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"corporateName"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"corporateName"))))}}
	{{lz.set("corporateName_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$corporateName}}
	<dl lz:if="{{corporateName_editable||corporateName_readonly}}" class="corporateName   mider" major  ref="corporateName">
		<dt>公司名称:</dt>
		<dd lz:if="{{corporateName_editable}}" input="text">
			<lz:block lz:if="{{merchant$corporateName}}">
				{{merchant$corporateName}}
			</lz:block>
			<lz:block lz:if="{{!merchant$corporateName}}">
		 	<input type="text" class="input mide"  maxlength="64" name="merchant.corporateName" id="corporateName"  value="{{lz.htm(merchant.corporateName)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入品牌信息的公司名称</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{corporateName_readonly}}">
		 	<div class="state-input mide">
		 		<textarea class=""  style="display:none;" id="corporateName">{{merchant.corporateName}}</textarea>
		 		<span>
		 	
			 {{lz.html(merchant.corporateName$||merchant.corporateName)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$corporateName}}
	{{lz.set("companyAddress_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"companyAddress"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"companyAddress"))))}}
	{{lz.set("companyAddress_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$companyAddress}}
	<dl lz:if="{{companyAddress_editable||companyAddress_readonly}}" class="companyAddress   wider" major  ref="companyAddress">
		<dt>公司地址:</dt>
		<dd lz:if="{{companyAddress_editable}}" input="textarea">
			<lz:block lz:if="{{merchant$companyAddress}}">
				{{merchant$companyAddress}}
			</lz:block>
			<lz:block lz:if="{{!merchant$companyAddress}}">
		 	<textarea class="input wide"  id="companyAddress" name="merchant.companyAddress" rows="5">{{merchant.companyAddress}}</textarea>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入品牌信息的公司地址</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{companyAddress_readonly}}">
		 	<div class="state-input wide">
		 		<span>
		 	
			 {{lz.html(merchant.companyAddress$||merchant.companyAddress)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$companyAddress}}
	{{lz.set("contacts_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"contacts"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"contacts"))))}}
	{{lz.set("contacts_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$contacts}}
	<dl lz:if="{{contacts_editable||contacts_readonly}}" class="contacts  " major  ref="contacts">
		<dt>联 系 人:</dt>
		<dd lz:if="{{contacts_editable}}" input="text">
			<lz:block lz:if="{{merchant$contacts}}">
				{{merchant$contacts}}
			</lz:block>
			<lz:block lz:if="{{!merchant$contacts}}">
		 	<input type="text" class="input narrow"  maxlength="32" name="merchant.contacts" id="contacts"  value="{{lz.htm(merchant.contacts)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入品牌信息的联系人</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{contacts_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="contacts">{{merchant.contacts}}</textarea>
		 		<span>
		 	
			 {{lz.html(merchant.contacts$||merchant.contacts)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$contacts}}
	{{lz.set("contactNumber_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"contactNumber"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"contactNumber"))))}}
	{{lz.set("contactNumber_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$contactNumber}}
	<dl lz:if="{{contactNumber_editable||contactNumber_readonly}}" class="contactNumber  " major  ref="contactNumber">
		<dt>联系电话:</dt>
		<dd lz:if="{{contactNumber_editable}}" input="text">
			<lz:block lz:if="{{merchant$contactNumber}}">
				{{merchant$contactNumber}}
			</lz:block>
			<lz:block lz:if="{{!merchant$contactNumber}}">
		 	<input type="text" class="input narrow"  maxlength="32" name="merchant.contactNumber" id="contactNumber"  value="{{lz.htm(merchant.contactNumber)}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请输入品牌信息的联系电话</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{contactNumber_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="contactNumber">{{merchant.contactNumber}}</textarea>
		 		<span>
		 	
			 {{lz.html(merchant.contactNumber$||merchant.contactNumber)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$contactNumber}}
	{{lz.set("remark_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"remark"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"remark"))))}}
	{{lz.set("remark_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$remark}}
	<dl lz:if="{{remark_editable||remark_readonly}}" class="ribs remark   wider" major  ref="remark">
		<dt>备注信息:</dt>
		<dd lz:if="{{remark_editable}}" input="textarea">
			<lz:block lz:if="{{merchant$remark}}">
				{{merchant$remark}}
			</lz:block>
			<lz:block lz:if="{{!merchant$remark}}">
		 	<textarea class="input wide"  id="remark" name="merchant.remark" rows="5">{{merchant.remark}}</textarea>
	 	 </lz:block>
	 	 
	 	 <em>请输入品牌信息的备注信息</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{remark_readonly}}">
		 	<div class="state-input wide">
		 		<span>
		 	
			 {{lz.html(merchant.remark$||merchant.remark)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$remark}}
	{{lz.set("mSort_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"mSort"))))&&true)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"mSort"))))}}
	{{lz.set("mSort_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$mSort}}
	<dl lz:if="{{mSort_editable||mSort_readonly}}" class="ribs mSort  " major  ref="mSort">
		<dt>排　　序:</dt>
		<dd lz:if="{{mSort_editable}}" input="number">
			<lz:block lz:if="{{merchant$mSort}}">
				{{merchant$mSort}}
			</lz:block>
			<lz:block lz:if="{{!merchant$mSort}}">
			<input onkeyup="var reg=/^-?(([1-9]\d{0,9})|0)?/;this.value=this.value.match(reg)?this.value.match(reg)[0]:''" type="text" class="input narrow"  maxlength="8" name="merchant.mSort" id="mSort"  value="{{lz.htm(merchant.mSort)}}"/>
	 	 </lz:block>
	 	 
	 	 <em>数值越大越排前</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{mSort_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="mSort">{{merchant.mSort}}</textarea>
		 		<span>
		 	
			 {{lz.html(merchant.mSort$||merchant.mSort)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$mSort}}
	{{lz.set("openState_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"openState"))))&&false)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"openState"))))}}
	{{lz.set("openState_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$openState}}
	<dl lz:if="{{openState_editable||openState_readonly}}" class="openState  " major  ref="openState">
		<dt>开启状态:</dt>
		<dd lz:if="{{openState_editable}}" input="select">
			<lz:block lz:if="{{merchant$openState}}">
				{{merchant$openState}}
			</lz:block>
			<lz:block lz:if="{{!merchant$openState}}">
		 	<select class="narrow" id="openState" name="merchant.openState">
		 		<option value="">请选择</option>
				<option value="1" selected='{{merchant.openState=="1"?"selected":""}}'>关闭</option>
				<option value="2" selected='{{merchant.openState=="2"?"selected":""}}'>开启</option>
		 	</select>
	 	 </lz:block>
	 	 
	 	 <em>请选择品牌信息的开启状态</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{openState_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="openState">{{merchant.openState}}</textarea>
		 		<span>
		 	
			 {{lz.html(merchant.openState$||merchant.openState)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$openState}}
	{{lz.set("updateTime_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"updateTime"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"updateTime"))))}}
	{{lz.set("updateTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$updateTime}}
	<dl lz:if="{{updateTime_editable||updateTime_readonly}}" class="updateTime  " major  ref="updateTime">
		<dt>修改时间:</dt>
		<dd lz:if="{{updateTime_editable}}" input="datetime">
			<lz:block lz:if="{{merchant$updateTime}}">
				{{merchant$updateTime}}
			</lz:block>
			<lz:block lz:if="{{!merchant$updateTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="merchant.updateTime" id="updateTime"  value="{{merchant.updateTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择品牌信息的修改时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{updateTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="updateTime">{{merchant.updateTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(merchant.updateTime$||merchant.updateTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$updateTime}}
	{{lz.set("addTime_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"addTime"))))&&false)||(edittype=='update'&&false)||((edittype=='any')&&(lz.idin(fields,"addTime"))))}}
	{{lz.set("addTime_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$addTime}}
	<dl lz:if="{{addTime_editable||addTime_readonly}}" class="addTime  " major  ref="addTime">
		<dt>添加时间:</dt>
		<dd lz:if="{{addTime_editable}}" input="datetime">
			<lz:block lz:if="{{merchant$addTime}}">
				{{merchant$addTime}}
			</lz:block>
			<lz:block lz:if="{{!merchant$addTime}}">
		 	<input onchange="void(0);" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="datetime input narrow" maxlength="19" name="merchant.addTime" id="addTime"  value="{{merchant.addTime$}}"/>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择品牌信息的添加时间</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{addTime_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="addTime">{{merchant.addTime}}</textarea>
		 		<span>
		 	
			 {{lz.html(merchant.addTime$||merchant.addTime)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$addTime}}
	{{lz.set("status_editable",((edittype=='insert'||(edittype=='inport' && (!lz.idin(inports,"status"))))&&false)||(edittype=='update'&&true)||((edittype=='any')&&(lz.idin(fields,"status"))))}}
	{{lz.set("status_readonly",(edittype=='insert'&&false)||(edittype=='update'&&false)||(edittype=='detail'))}}
	
	{{before$status}}
	<dl lz:if="{{status_editable||status_readonly}}" class="status  " major  ref="status">
		<dt>状　　态:</dt>
		<dd lz:if="{{status_editable}}" input="select">
			<lz:block lz:if="{{merchant$status}}">
				{{merchant$status}}
			</lz:block>
			<lz:block lz:if="{{!merchant$status}}">
		 	<select class="narrow" id="status" name="merchant.status">
		 		<option value="">请选择</option>
				<option value="1" selected='{{merchant.status=="1"?"selected":""}}'>正常</option>
				<option value="0" selected='{{merchant.status=="0"?"selected":""}}'>无效</option>
		 	</select>
	 	 </lz:block>
	 	 <b>*</b>
	 	 <em>请选择品牌信息的状态</em> 
	 	 <a class="mui-navigate-right"></a>
		</dd>
		<dd lz:if="{{status_readonly}}">
		 	<div class="state-input narrow">
		 		<textarea class=""  style="display:none;" id="status">{{merchant.status}}</textarea>
		 		<span>
		 	
			 {{lz.html(merchant.status$||merchant.status)}}
	 	 		</span>
	 	 	</div>
		</dd>
	</dl>
	{{after$status}}
			
			
			<div class="line">
				<center lz:if="{{edittype=='insert'}}">
					<a onclick="$('.ribs').show();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:inline;padding: 0px 15px;">点击展开更多编辑项</a>
					<a onclick="$('.ribs').hide();window.fireResize();$('.ribs-handle').toggle();" href="javascript:void(0);" class="state-content ribs-handle" style="display:none;padding: 0px 15px;">点击收起更多编辑项</a>
				</center>
			</div>
			<center class="buttons">
				<input type="hidden" value="{{merchant.id}}" name="merchant.id" id="id" />
			
			<lz:block lz:if="{{edittype=='insert'||edittype=='update'||edittype=='any'||edittype=='inport'}}">
				<button class="button" type="submit">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					保存&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
			
			<lz:block lz:if="{{edittype=='detail'}}">
				<button lz:if="{{canEdit}}" type="button" class="button" onclick='window.location.href="/admin/business/merchant.edit.html?edittype=update&id={{merchant.id}}"'>
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-tick.png"/>
					<span class="iconB iconfont icon-weibiaoti8"></span>
					修改&nbsp;&nbsp;</button>
				<button lz:if="{{canDel}}" type="button" class="button" onclick="deleteMerchant('{{merchant.id}}','{{merchant.brandName}}')">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					删除&nbsp;&nbsp;</button>
				<button title="不保存数据,关闭窗口,不刷新原列表" class="button" onclick="cancel();" type="button">
					&nbsp;<img class="iconA" align="absmiddle" width="20" src="/admin/images/icons/Badge-multiply.png"/>
					<span class="iconB iconfont icon-icon11"></span>
					关闭&nbsp;&nbsp;</button>
			</lz:block>
					
			</center>
			<br/>

		</div>
	</div>
	<div class="foot"></div>		
</form>

 


<!------------------------VIEW_HTML_BOTTOM------------------------>
<!------------------------VIEW_HTML_BOTTOM------------------------>


</body>

<!------------------------VIEW_HTML_FOOTER------------------------>
<!------------------------VIEW_HTML_FOOTER------------------------>
<script>
	
	$(function(){
		if(parent.setit){
			parent.setit("/admin/business/merchant.edit.html",document.title,"/admin//images/icons/1938404416.png");
		}
	});
	
	function cancel(){
		if(parent.closeHref){
			parent.closeHref("/admin/business/merchant.edit.html");
		}else{
			$.closeModalDialog();
		}
	}


	/**
	* 删除品牌信息
	**/
	function deleteMerchant(id,flag)
	{
		var dialog=top.$.dialog({
				html:"<span style='white-space:nowrap;'>确定要删除当前数据吗？</span>",
				title:"删除品牌信息",
				modal: true,			
				onOk:function(){
					dialog.closeDialog();
					var url = "/admin/business/merchant.delete.do";
					var params = {id:id};
					var protocol = $.getAjax(url,params);
					if(protocol.message){
						top.$.toast(protocol.message);
					}
					if(protocol.success){
						caller.location.href=caller.location.href;		
					}
				}
		 });	
	}
</script>
</html>